package com.yun.util;

import java.util.ArrayList;
import java.util.List;

/**
 * 类型转换工具类
 * @author Administrator
 *
 */


public class ConvertUtil {
	
	/**
	 * 将list集合转换为String字符串
	 * @author Administrator
	 */
	public static String ListTOString(List list){
		String s="";
		for (int i = 0; i < list.size(); i++) {
		    if (s=="") {
		    s= list.get(i)+s;
		    }else {
		    s=s+","+list.get(i);
		    }
		}
		return s;
	}
	
	/**
	 * 测试转换方法
	 * @author Administrator
	 *
	 *//*
	public static void main(String[] args){
		List list=new ArrayList();
		list.add(10);
		list.add(58);
		list.add(89);
		String s = ListTOString(list);
		System.out.println(s);
	}*/
}


